package com.example.demo.pojo.vo;

import com.example.demo.enumeration.Campus;
import com.example.demo.enumeration.ItemCategory;
import com.example.demo.enumeration.ItemStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@ToString
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class ItemDetailVO {
    private Long id;

    private String name;

    private BigDecimal price;

    private String description;

    private ItemCategory category;

    private Long userId;

    private List<Campus> campuses; // 商品校区列表

    private List<String> images; // 图片url列表

    private ItemStatus status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public ItemDetailVO() {
    }

    public ItemDetailVO(Long id, String name, BigDecimal price, String description, ItemCategory category, Long userId, List<Campus> campuses, ItemStatus status, LocalDateTime createTime, LocalDateTime updateTime, List<String> images) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.description = description;
        this.category = category;
        this.userId = userId;
        this.campuses = campuses;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.images = images;
    }
}
